|
![]() | |||
![]() |
|||
![]() | |||
|
![]() |
![]() | |||||||||||||||||||||||||||||||||
Viewing PDF documents directly on the stage using Adobe's ActiveX control
Director 6.5 & above for Windows can display PDF documents directly on the stage using Adobe's "Acrobat Control for ActiveX" ActiveX control and Director's Control Xtra for ActiveX feature. The Adobe Active X control is included in the Acrobat Reader download. Macromedia does not provide Technical Support for implementation of ActiveX controls. Please contact Adobe for any questions regarding the use of their ActiveX control. For more information, see the notes section below. The primary reason for using Adobe's ActiveX control is that it eliminates having to launch the Acrobat Reader application to view PDF documents. For information on how to use Lingo to launch external applications, refer to "Launching or Opening an Application with Lingo", TechNote #12265. To use an ActiveX control on a Windows system, Microsoft's ActiveX system software must be properly installed. ActiveX support is standard on Windows 98, and is typically available on Windows systems that have Microsoft's Internet Explorer web browser installed. ActiveX is a 32-bit technology, and it is not available for Windows 3.1. For more information refer to Microsoft and Requirements for Director 6.5 movies using ActiveX Controls (TechNote 13375). Additional ActiveX control authoring issues are discussed at the end of this TechNote. To insert Adobe's "Acrobat Control for ActiveX" ActiveX control as a cast member, and create a sprite, do the following:
If the
Director movie is in play mode, the PDF document should now be viewable in
the ActiveX sprite on the stage. If not, confirm the steps above. Confirm
the installation of the ActiveX system extension on the machine. If
necessary, test against other PDF files to determine if the problem is
caused by a data-related issue. PDF documents in relative locations If the PDF
file is located in the same folder as the Director movie, use Lingo to set
the ActiveX Control's "src" parameter so that the file can be found in
that location, regardless of what drive the Director movie is running
from. In a frame script's "on enterFrame" handler, the SRC of the PDF can be set using the Lingo statement "sprite(1).src". The script below could also be modified to load the PDF into the ActiveX sprite when a button is pressed. For example, the following behavior script could be assigned to the Behavior Channel on the first frame where the ActiveX sprite begins: ----------------------------------------
Note: The above script uses
Director's new dot syntax (as of version 7). For Director 6.5, use "set
the src of sprite 1 = the moviePath & "MyPDF.pdf". Additional informationFor more information on how to use Adobe's "Acrobat Control for ActiveX" ActiveX control, refer to the documentation available on Adobe's web site. Refer to Director's documentation to learn more about using the Control Xtra for ActiveX. Additionally, an ActiveX Help file named "ActiveX.hlp" is included with the installation of Director. It is located in the ActiveX folder inside Director's Xtras folder. ActiveX is a
Windows-only technology. ActiveX is not available for Macintosh. To view
PDF files directly on the stage in cross-platform projects use a third
party Xtra such as the "PDF Xtra"
available from Integration
New Media. The "Methods" tab in Director's Control Xtra for ActiveX dialog displays an ActiveX control's available methods (if any). In the case of Adobe's Acrobat Control for ActiveX, it offers numerous methods that affect the appearance of their control. This includes setting the document's zoom, the layout, etc. The ActiveX control's methods are accessed via Lingo. For example, use the Lingo "sprite(1).setCurrentPage(45)" to go to page 45 of the PDF file, or "sprite(1).printPages(1,10)" to print the first 10 pages of the document.
|
![]() |
![]() |
Use of this website signifies your agreement to the Terms of Use. Privacy | Site Map | Contact us | Accessibility |